<!--#
    var catalog = platform.findCatalogById(numberUtil.toLong(parameter.id));
-->
<!--#layout("common/page.html",{"jsBase":"/js/","title":util.getCatalogName(catalog),"curCatalog":catalog}){  -->
<div class="doc-container" id="doc-container">
    <div class="page-banner">
        <!--#
               var image = util.getCatalogImage(catalog);
               var style = '';
               if (image != null) {
                   style = 'background-image:url(/core/file/inline/' + image.id + '/' + image.name +')';
               } else {
                   style = 'background-image:url(' + tpl + '/image/banner.jpg)';
               }
            -->
        <div class="page-banner-img-wrapper" style="${style}">
            <div class="banner-title">${util.getCatalogName(catalog)}</div>
        </div>
    </div>
    <div class="container-fixed">
        <div class="margin-top">
            <span class="layui-breadcrumb">
              <a href="/">${util.getLocalValue("site.home")}</a>
              <a href="javascript:void(0)">${util.getCatalogName(catalog)}</a>
            </span>
            <hr />
        </div>
        <div class="inner">
            <!--#
               var subCatalogList = cms.getCatalogByDictTypeAndValueAndParentCatalogId("","",catalog.id);
               if (subCatalogList != null && subCatalogList.~size > 0) { -->
                    <div style="clear:both;display: flex;flex-direction: row;justify-content: center;">
                        <!--# for(subCatalog in subCatalogList) {  -->
                            <a class="float-left margin-right button bg-red align-center size-big margin-bottom" href="${(subCatalog.code == null || subCatalog.code == '') ? (subCatalog.accessUrl+'?id='+subCatalog.id) : subCatalog.code}" >${util.getCatalogName(subCatalog)}</a>
                        <!--# } -->
                    </div>
            <!--# } -->
            <article class="article-list bloglist" id="LAY_bloglist" >
                <!--# var limit = parameter.limit!10;  -->
                <layui:cmsArticleList var="articlePage" tagValue="${parameter.tag}" catalogId="${ stringUtil.toString(catalog.id!)}" keywords="${parameter.keywords}" orderby="top desc,show_time desc,id desc" page="${parameter.page!'1'}" pageSize="${ stringUtil.toString(limit)}">
                    <!--#
                    for(article in articlePage.list) {
                    -->
                    <section class="article-item zoomIn article">
                        <!--# if(article.top == true) { -->
                        <div class="fc-flag">置顶</div>
                        <!--# } -->
                        <h5 class="title">
                            <!--# if(article.yuanchuang! == true) { -->
                            <span class="fc-blue">【原创】</span>
                            <!--# }-->
                            <a href="${ctxPath}/article.do?id=${article.id}&lang=${parameter.lang}">${util.getArticleTitle(article)}</a>
                        </h5>
                        <div class="time">
                            <span class="day">${article.showTime,dateFormat="dd"}</span>
                            <span class="month fs-18">${article.showTime,dateFormat="MM"}<span class="fs-14">月</span></span>
                            <span class="year fs-18">${article.showTime,dateFormat="yyyy"}</span>
                        </div>
                        <div class="content">
                            <a href="${ctxPath}/article.do?id=${article.id}" class="cover img-light">
                                <layui:show_image attachmentId="${article.imageId}" />
                            </a>
                            ${util.getArticleDesc(article)}
                        </div>
                        <div class="read-more">
                            <a href="${ctxPath}/article.do?id=${article.id}&lang=${parameter.lang}" class="fc-black f-fwb">继续阅读</a>
                        </div>
                    </section>
                    <!--#} -->
                    <!--#if (articlePage.totalRow == 0 ) { -->
                    <section class="article-item zoomIn article align-center" style="font-size:2rem">
                        暂无数据
                    </section>
                    <!--# } -->
                    <!--#if (articlePage.totalPage > 1) {  -->
                    <div id="page" class="align-center"></div>
                    <script>
                        layui.use(['laypage'],function() {
                            var laypage = layui.laypage;
                            //完整功能
                              laypage.render({
                                elem: 'page'
                                ,count: ${articlePage.totalRow!0}
                                ,curr:${parameter.page!1}
                                ,limit:${limit}
                                ,layout: ['count', 'prev', 'page', 'next', 'limit', 'refresh', 'skip']
                                ,jump: function(obj,first){
                                  //首次不执行
                                  if(!first){
                                      if (obj.limit == '${limit}') {
                                          document.location.href="${catalog.accessUrl}?${util.parameters()}&page=" + obj.curr;
                                      } else {
                                          document.location.href="${catalog.accessUrl}?${util.parameters()}&page=" + obj.curr + "&limit=" + obj.limit;
                                      }
                                  }
                                }
                              });
                        })
                    </script>
                        <!--# }  -->
                </layui:cmsArticleList>
            </article>
        </div>
    </div>
</div>

<script src="${ctxPath}${tpl}/js/plugins/nprogress.js"></script>
<script>NProgress.start();</script>
<script src="${ctxPath}${tpl}/js/article.js"></script>
<script>
    window.onload = function () {
        NProgress.done();
    };
</script>
<!--#}  -->